package us.icitap.commandcenter.business.ejb.persistence;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="ORG_STRUCTURE",schema="MPC")
public class OrgStructure implements Serializable {

	@Id
	private Integer id;
	@Column
	private String name;
	
	@ManyToOne
	@JoinColumn(name="PARENT_ORG_STRUCT_ID")
	private OrgStructure parentOrgStructure;
	
	private boolean active = true;
	
	public OrgStructure(){}
	
	public OrgStructure(Integer id, String name){
		this.id = id;
		this.name = name;
	}
 
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}


	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}



	public OrgStructure getParentOrgStructure() {
		return parentOrgStructure;
	}

	public void setParentOrgStructure(OrgStructure parentOrgStructure) {
		this.parentOrgStructure = parentOrgStructure;
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	
}
